Add agentic deploy scripts, CRDs, and operator integration#1582
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| update_crds_and_rbac() { | ||
| step "Updating CRDs and RBAC" | ||
| cd "${OPERATOR_DIR}" | ||
| make manifests kustomize >/dev/null 2>&1 |
There was a problem hiding this comment.
Developer experience hint, many commands throw the output away, so the script fails without giving reasons why.
My agent suggests something like and I tent to agree
_run() {
local _out
_out=$(mktemp)
if "$@" >"${_out}" 2>&1; then
rm -f "${_out}"
else
local _rc=$?
echo -e " ${RED}✗${NC} Command failed: $*" >&2
cat "${_out}" >&2
rm -f "${_out}"
return ${_rc}
fi
}| # Step 3: AgenticConfig — Cluster Admin | ||
| # Approval policy, console/sandbox images, concurrency limits. | ||
| ########################################################################### | ||
| local AGENT_IMAGE="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-agentic-sandbox:${TAG}" |
There was a problem hiding this comment.
| local AGENT_IMAGE="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-agentic-sandbox:${TAG}" | |
| local AGENT_IMAGE="${INTERNAL_REG}/${NS_OPERATOR}/${BC_AGENT}:${TAG}" |
| local OPERATOR_IMG="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-operator:${TAG}" | ||
| local CONSOLE_IMG="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-console-plugin:${TAG}" |
There was a problem hiding this comment.
| local OPERATOR_IMG="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-operator:${TAG}" | |
| local CONSOLE_IMG="${INTERNAL_REG}/${NS_OPERATOR}/lightspeed-console-plugin:${TAG}" | |
| local OPERATOR_IMG="${INTERNAL_REG}/${NS_OPERATOR}/${BC_OPERATOR}:${TAG}" | |
| local CONSOLE_IMG="${INTERNAL_REG}/${NS_OPERATOR}/${BC_CONSOLE}:${TAG}" |
There was a problem hiding this comment.
Given all the other envs are also set in one place, might make sense to do this for _IMG vars as well. I see the SKILLS_IMAGE in redeploy.sh as well… the consistency could help a bit.
I know it's just a dev script, but still…
| -p "{\"spec\":{\"output\":{\"to\":{\"name\":\"${bc_name}:${TAG}\"}}}}" >/dev/null 2>&1 | ||
| echo " Building ${label} on cluster (uploading source)..." | ||
| oc start-build "${bc_name}" -n "${NS_OPERATOR}" \ | ||
| --from-dir="${from_dir}" --follow \ |
There was a problem hiding this comment.
needs --wait as well, otherwise it returns 0 even on failure.
| # Uploads the source directory to a builder pod, which runs the Dockerfile | ||
| # natively on amd64 and pushes to the internal registry — no local container | ||
| # engine, cross-compilation, registry route, or auth tokens needed. | ||
| build_on_cluster() { |
There was a problem hiding this comment.
given build_on_cluster and start_build_async are very similar, how about having just _build sync and _build async and handle the differences in particular places.
|
Great feedback @iNecas , thanks, I will update the PR and test with those changes. |
d802857 to
637a769
Compare
Adds the agentic stack deployment infrastructure to lightspeed-operator:
Deploy scripts (hack/agentic/):
- deploy.sh: Full deploy with on-cluster builds (--provider=vertex|bedrock)
- redeploy-{operator,agent,console,skills,all}.sh: Fast iteration scripts
- undeploy.sh: Teardown with timeout + finalizer cleanup for stuck CRDs
- lib.sh: Shared build helpers with _run() error wrapper, unified _build
sync|async, centralized image vars, --wait on oc start-build
Operator integration:
- cmd/main.go: Wire agentic controller with --agentic-console-image and
--agentic-sandbox-image flags
- Add LightspeedAgents to FeatureGate enum in OLSConfig CRD
- Agentic CRDs: ApprovalPolicy, Agent, LLMProvider, Proposal, results
- config/rbac-agentic/: RBAC for agentic controller
- Dockerfile.dev: Local module builds for agentic-operator dependency
- Add FeatureGateLightspeedAgents and agentic image default constants
Demo proposals use find-token skill from quay.io/harpatil/agentic-skills
(TODO: replace with Konflux-built image when available).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds agentic stack deploy scripts (
hack/agentic/), agentic CRDs,LightspeedAgentsfeature gate, and operator integration for console/sandbox image management.🤖 Generated with Claude Code